/*
 * @Descripttion: 核酸宝项目前端
 * @version: 
 * @Author: 杜宇轩
 * @Date: 2022-05-22 05:23:33
 * @LastEditors: 杜宇轩
 * @LastEditTime: 2022-05-22 06:17:13
 */
const admin = {
    namespaced: true,
    state: {
      currentNotice: {},
      currentUser: {}
    },
  
    getters: {
      getCurrentNotice: (state) => {
        return state.currentNotice;
      },
      getCurrentUser: (state) => {
        return state.currentUser;
      }
    },
  
    mutations: {
      SET_DATA: (state, payload) => { // 从localStorage同步
        state.currentNotice = payload.currentNotice;
        state.currentUser = payload.currentUser;
      },
      setNotice: (state, payload) => {
        state.currentNotice = payload;
      },
      setUser: (state, payload) => {
        state.currentUser = payload;
      }
    },
  
    actions: {
    }
  
  };
  
  export default admin;
  